# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Contributor: Sergey Lukin <sergej.lukin@gmail.com>
# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libwnck3
pkgver=43.0
pkgrel=3
pkgdesc="Window Navigator Construction Kit"
url="https://gitlab.gnome.org/GNOME/libwnck"
arch="all"
license="LGPL-2.0-or-later"
subpackages="$pkgname-dev $pkgname-lang"
replaces="libwnck"
makedepends="
	cairo-dev
	glib-dev
	gobject-introspection-dev
	gtk+3.0-dev
	libx11-dev
	libxres-dev
	meson
	pango-dev
	startup-notification-dev
	"
options="!check" # no tests
source="https://download.gnome.org/sources/libwnck/${pkgver%.*}/libwnck-$pkgver.tar.xz
	$pkgname-invalidate-icons-sigsegv.patch::https://gitlab.gnome.org/GNOME/libwnck/-/commit/9cd7b8108d670fca7f25af14e18845c3ff663af9.diff
	"

builddir="$srcdir"/libwnck-$pkgver

build() {
	abuild-meson \
		-Db_lto=true \
		-Dgtk_doc=false \
		. output
	meson compile -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
f6c14b0a650c6d5ab4d4013e6add3972a0f0bcdedfb9785f64199c9a65713d11c9d936e8b04d0f04707c3d165dd345bfa806f654bf82eabb765546b8914d68d2  libwnck-43.0.tar.xz
444ab82dc92f96f368fdd2bba493c2a79a33cb3cf3780f79d6136c0a2425b6d0a92abf048d78205fbf5653785dff770cef3ef22df81065654961bae809f20432  libwnck3-invalidate-icons-sigsegv.patch
"
